Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new PyK wrappers to LLVM Python Bindings #4426

Merged
merged 31 commits into from
Jun 12, 2024

Conversation

Robertorosmaninho
Copy link
Collaborator

This PR exposes the new infrastructure created by the LLVm Backend to parse the Hints file.
We introduce the wrappers to make the streaming parser possible to use as a list of events and access it through an integrator. Or not loading all the events at the same time but accessing them one per time through the next() function.

Depends on: runtimeverification/llvm-backend#1090

@Robertorosmaninho Robertorosmaninho marked this pull request as ready for review June 7, 2024 19:39
@Robertorosmaninho Robertorosmaninho self-assigned this Jun 7, 2024
@Robertorosmaninho Robertorosmaninho added the pyk Issues transferred from runtimeverification/pyk label Jun 7, 2024
Copy link
Collaborator

@theo25 theo25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but let’s wait for at least one approval from the RV K team before merging.

Copy link
Contributor

@Baltoli Baltoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor comments, and I'll let @tothtamas28 provide a final review as well in case I've missed anything.

pyk/src/pyk/kllvm/hints/prooftrace.py Outdated Show resolved Hide resolved
pyk/src/pyk/kllvm/hints/prooftrace.py Outdated Show resolved Hide resolved
pyk/src/pyk/kllvm/hints/prooftrace.py Outdated Show resolved Hide resolved
pyk/src/pyk/kllvm/hints/prooftrace.py Show resolved Hide resolved
@Robertorosmaninho
Copy link
Collaborator Author

This is the new rendered comments:
image

pyk/docs/conf.py Outdated Show resolved Hide resolved
pyk/src/pyk/kllvm/hints/prooftrace.py Outdated Show resolved Hide resolved
pyk/src/pyk/kllvm/hints/prooftrace.py Outdated Show resolved Hide resolved
Comment on lines +394 to +395
input_kore_file = kompile._cache_definition(self.HINTS_INPUT_KORE)
hints_file_name = definition_dir.name.replace('.k', '.hints')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit hacky. Consider implementing a dedicated cache of hints inputs for ProofTraceTest. Then no renaming is needed, and kompiler can be dropped as a direct dependency.

(After the renaming, the cache might no longer point to the right file.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The renaming is just for creating a new file with a custom name instead of simply ‘hints.bin’ or something static like this. This is mainly to avoid the use of 2 different tests appending in the same file (an issue that I found while writing those tests).

pyk/src/pyk/testing/_kompiler.py Outdated Show resolved Hide resolved
@Robertorosmaninho
Copy link
Collaborator Author

Ping @Baltoli

@Baltoli Baltoli dismissed their stale review June 12, 2024 08:15

Comments addressed

@rv-jenkins rv-jenkins merged commit 5000678 into develop Jun 12, 2024
16 checks passed
@rv-jenkins rv-jenkins deleted the pyk-streaming-parser-hints branch June 12, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge pyk Issues transferred from runtimeverification/pyk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants